<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>后台首页</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
  <link rel="stylesheet" href="jquery-easyui-1.4/themes/icon.css" type="text/css"></link>
  <link rel="stylesheet" href="jquery-easyui-1.4/themes/default/easyui.css" type="text/css"></link>
  <script type="text/javascript" src="jquery-easyui-1.4/jquery.min.js"></script>
  <script type="text/javascript" src="jquery-easyui-1.4/locale/easyui-lang-zh_CN.js"></script>
  <script type="text/javascript" src="jquery-easyui-1.4/jquery.easyui.min.js"></script>
  <script type="text/javascript">
  		$(function(){
  				$('#tt').tree({    
    				url:'tree_data.json'   
				}); 
				
				//左边树
				 $('#tt').tree({
				 		onClick:function(node){
				 			tab(node.text,node.url);
				 		}
				 });
				 
				 $('#aa').accordion({    
   						 animate:false,
   						 fit:true 
					}); 
				 
				 function tab(title,url){
				 	if($('#tb').tabs('exists',title)){//判断tab是否存在
				 	 	$('#tb').tabs('select', title); //存在则获取tab
				 	}else{//不存在tab则创建
				 		$('#tb').tabs('add', {
                      			  			title:  title,
                      			  			closable: true,
                      			  			content:'<iframe scrolling="auto" frameborder="0"  src="' + url + '" style="width:100%;height:100%;"></iframe>'
                    				});  
				 	}
				 }
				 
  		});
  </script>
  </head>
  
  <body class="easyui-layout">   
    <div data-options="region:'north',title:'North Title',split:false" style="height:100px;"></div>   
    <div data-options="region:'south',title:'South Title',split:false" style="height:0px;"></div>   
    <div data-options="region:'east',iconCls:'icon-reload',title:'East',split:false" style="width:180px;"></div>   
    <div id="west" data-options="region:'west',title:'导航',split:false" style="width:180px;">
    		<div id="aa" class="easyui-accordion" style="width:300px;height:200px;">   
   				 <div title="用户管理" data-options="iconCls:'icon-save',selected:true" style="overflow:auto;padding:10px;">   
					       <ul id="tt"></ul>  
			    </div>   
			    <div title="页面管理" data-options="iconCls:'icon-reload'" style="padding:10px;">   
			       页面管理   
			    </div>   
			    <div title="广告通知管理" data-options="iconCls:'icon-set',href:'tree_data.json'"> 
			    </div>   
			    <div title="系统设置" data-options="iconCls:'icon-set'">   
			    </div>   
			</div>  
    </div>   
    <div  id="tb" class="easyui-tabs" data-options="region:'center'" style="padding:0px;">
		            <div title="首页">   
    						代华军,欢迎你!
		            </div>    
    </div>   
</body> 
</html>
